﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;

namespace GA_SCHED_DESIGNER
{
    /// <summary>
    /// Interaction logic for RoomsWindow.xaml
    /// </summary>
    public partial class RoomsWindow : Window
    {
        Acceron.University.DBAccess.CRM_University_GADataContext conext;

        public RoomsWindow()
        {
            InitializeComponent();
        }

        private void Window_Loaded(object sender, RoutedEventArgs e)
        {
            conext = new Acceron.University.DBAccess.CRM_University_GADataContext();
            dataGrid1.ItemsSource = conext.Rooms;
        }

        private void button1_Click(object sender, RoutedEventArgs e)
        {
            conext.SubmitChanges();
            DialogResult = true;
        }

        private void button2_Click(object sender, RoutedEventArgs e)
        {
            DialogResult = false;
        }


    }
}
